package com.erps.sys.rest;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import com.erps.CommonUtils.StringEx;
import com.erps.db.DBManager;
import com.hmkj.entity.ErspSysFunction;

public class ErspSysFunctionRest {
	public List<ErspSysFunction> Query() {
		List<ErspSysFunction> arKeys = new ArrayList<ErspSysFunction>();
		List<Map<String, String>> dtRows = DBManager
				.QueryData("select id,func_name,func_key,func_desc,last_update_time from ersp_sys_function ");
		int iLength = (dtRows == null) ? 0 : dtRows.size();
		for (int i = 0; i < iLength; i++) {
			Map<String, String> vo = dtRows.get(i);
			ErspSysFunction vs = new ErspSysFunction();
			vs.setId(StringEx.getMapVal(vo, "id"));
			vs.setFunc_name(StringEx.getMapVal(vo, "func_name"));
			vs.setFunc_key(StringEx.getMapVal(vo, "func_key"));
			vs.setFunc_desc(StringEx.getMapVal(vo, "func_desc"));
			arKeys.add(vs);
		}
		return arKeys;

	}
}